<div class="full">
    
    <div class="span5">
        
        <p><h5><i class="icon-star"></i> Solicitação</h5></p>
        
        <input type="hidden" name="log_id" value="<?php echo $log_id;?>">
        <label>Solicitante:</label>
        <p><?php echo $cliente; ?></p>
        <label>País:</label>
        <?php 
        $estilo = "class='span5'";
        include "mod/combo/pai_id.php";
        ?>
        <label>Localidade Sede:</label>
        <?php include "mod/combo/sed_id.php";?>
        <label>Aeronave:</label>
        <?php include "mod/combo/aer_id.php";?>
        <label>Atividade:</label>
        <?php include "mod/combo/ati_id.php";?>
        <label>Quantidade:</label>
        <input type="text" name="log_qtd" value="<?php echo $log_qtd;?>" class="span2">
        <label>Service Local Time</label>
        <input type="text" name="log_localtime" value="<?php echo $log_localtime;?>" class="span2 hora" placeholder="HH:MM">
        <label>Appron Place</label>
        	<select name="log_appron">
            	<option value="ALFA LINE" <?php if ($log_appron == 'ALFA LINE') echo 'selected';?>>ALFA LINE</option>
            	<option value="BRAVO LINE" <?php if ($log_appron == 'BRAVO LINE') echo 'selected';?>>BRAVO LINE</option>
            	<option value="DELTA LINE" <?php if ($log_appron == 'DELTA LINE') echo 'selected';?>>DELTA LINE</option>
            	<option value="INDIA LINE" <?php if ($log_appron == 'INDIA LINE') echo 'selected';?>>INDIA LINE</option>
            	<option value="RUNWAY 30" <?php if ($log_appron == 'RUNWAY 30') echo 'selected';?>>RUNWAY 30</option>
            	<option value="FOXTROT LINE" <?php if ($log_appron == 'FOXTROT LINE') echo 'selected';?>>FOXTROT LINE</option>
            	<option value="OTHER" <?php if ($log_appron == 'OTHER') echo 'selected';?>>OTHER</option>
            </select>
        <label>Local of Time Dep</label>
        <input type="text" name="log_timedep" value="<?php echo $log_timedep;?>" class="span2 hora">
        
    </div>
		<?php
			$sqlLogisticaAbastecimento = "select * from logistica where log_id = '{$log_id}'";
	        $fetch = sql($sqlLogisticaAbastecimento);
	        $logisticaAbastecimento = mysql_fetch_array($fetch);
	        $log_sta_id = $logisticaAbastecimento['log_sta_id'];
        ?>
    <div class="span5">
        
        <p><h5><i class="icon-plus"></i> Incluir ações</h5></p>
        
        <label>Descrição da ação:</label>
        <textarea name="aca_msg"><?php echo $aca_msg; ?></textarea>
        <label>Status:</label>
        <?php include "mod/combo/log_sta_id.php"; ?>
        <input type="submit" name="botao" value="Incluir" class="btn"> 
        
    </div>
    
    <span class="span4">
        
        <p><h5><i class="icon-comment"></i> Últimas ações</h5></p>
        
        <?php
        $sql = "SELECT * FROM logisticaacao 
        INNER JOIN logistica ON logistica.log_id=logisticaacao.log_id
        LEFT JOIN cliente ON cliente.cli_id=logisticaacao.cli_id
        LEFT JOIN posto ON posto.pos_id=cliente.pos_id
        LEFT JOIN logisticastatus ON logisticastatus.log_sta_id=logisticaacao.log_sta_id
        WHERE logisticaacao.log_id='$log_id' ORDER BY logisticaacao.aca_data DESC, logisticaacao.aca_hora DESC";
        $res = sql($sql);
        $x=0;
        while($linha = mysql_fetch_array($res)){
        ?>
        <div id="accordion2" class="accordion">
                <?php if ($x == 0){ ?>
                <div class="accordion-group">
                  <div class="accordion-heading">
                    <a href="#<?php echo $linha['aca_id'];?>" data-parent="#accordion2" data-toggle="collapse" class="accordion-toggle">
                      <?php echo "<span style='color:#{$linha['log_sta_cor']}'>{$linha['log_sta_nome']}</span> - ".todatabr($linha['aca_data'])." {$linha['aca_hora']}h"; ?>
                    </a>
                  </div>
                  <div class="accordion-body collapse in" id="<?php echo $linha['aca_id'];?>">
                    <div class="accordion-inner">
                      <?php 
                      echo "<p>{$linha['aca_msg']}</p>"; 
                      echo "<p>Solucionador: {$linha['cli_code']} {$linha['pos_nome']}{$linha['cli_nome']}</p>"; 
                      ?>
                    </div>
                  </div>
                </div>
                <?php } else { ?>
                <div class="accordion-group">
                  <div class="accordion-heading">
                    <a href="#<?php echo $linha['aca_id'];?>" data-parent="#accordion2" data-toggle="collapse" class="accordion-toggle">
                      <?php echo "<span style='color:#{$linha['cha_sta_cor']}'>{$linha['log_sta_nome']}</span> - ".todatabr($linha['aca_data'])." {$linha['aca_hora']}h"; ?>
                    </a>
                  </div>
                  <div class="accordion-body collapse" id="<?php echo $linha['aca_id'];?>">
                    <div class="accordion-inner">
                      <?php 
                      echo "<p>{$linha['aca_msg']}</p>"; 
                      echo "<p>Solucionador: {$linha['cli_code']} {$linha['pos_nome']}{$linha['cli_nome']}</p>"; 
                      ?>
                    </div>
                  </div>
                </div>
                <?php } ?>
              </div>
        <?php $x++; } ?>
        
    </span>
    
</div>